#!/bin/bash

start=$1
end=$2
script_path=$3

start_tmp=$(printf '%s %s:00:00' ${start:0:8} ${start:8:2})
end_tmp=$(printf '%s %s:00:00' ${end:0:8} ${end:8:2})
start_date=`date -d "$start_tmp" +%s`
end_date=`date -d "$end_tmp" +%s`
for (( i=${start_date};i<=${end_date};i=i+3600))
do
    each=`date -d @${i} +%Y%m%d%H`
    echo ${each}
	sh ${script_path} ${each}
done
